package com.topcheer.base.gatewaynacos.web;

import com.topcheer.base.gatewaynacos.common.ResultVo;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Flux;

/**
 * @author xutao
 * @Package com.topcheer.base.gatewaynacos.web
 * @Description: ${todo}
 * @date 2020/1/17 14:59
 */
@RestController
public class FallbackController {

    @GetMapping("/fallback")
    public Flux<ResultVo> fallback(){
        return Flux.just(ResultVo.builder().code(HttpStatus.TOO_MANY_REQUESTS.value()).msg(HttpStatus.TOO_MANY_REQUESTS.name()).build());
    }
}
